package com.tdkj.model.bbs;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * EjfBookmark entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ejf_bookmark", catalog = "west")
public class EjfBookmark implements java.io.Serializable {

	// Fields

	private Integer markId;
	private EjfUser ejfUser;
	private String url;
	private String title;
	private String boardName;
	private Timestamp createTime;

	// Constructors

	/** default constructor */
	public EjfBookmark() {
	}

	/** minimal constructor */
	public EjfBookmark(EjfUser ejfUser, String url, String title) {
		this.ejfUser = ejfUser;
		this.url = url;
		this.title = title;
	}

	/** full constructor */
	public EjfBookmark(EjfUser ejfUser, String url, String title, String boardName, Timestamp createTime) {
		this.ejfUser = ejfUser;
		this.url = url;
		this.title = title;
		this.boardName = boardName;
		this.createTime = createTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "markID", unique = true, nullable = false)
	public Integer getMarkId() {
		return this.markId;
	}

	public void setMarkId(Integer markId) {
		this.markId = markId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "userID", nullable = false)
	public EjfUser getEjfUser() {
		return this.ejfUser;
	}

	public void setEjfUser(EjfUser ejfUser) {
		this.ejfUser = ejfUser;
	}

	@Column(name = "url", nullable = false, length = 100)
	public String getUrl() {
		return this.url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	@Column(name = "title", nullable = false, length = 100)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "boardName", length = 20)
	public String getBoardName() {
		return this.boardName;
	}

	public void setBoardName(String boardName) {
		this.boardName = boardName;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

}